package com.xzx.annotation.bean;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author xinzhixuan
 * @version 1.0
 * @date 2025/4/19 13:20
 */
@Data
@PropertySource(value = "classpath:person.properties", encoding = "utf-8")
@Component
public class Person07 {

    @Value("张三")
    private String name;
    @Value("#{20-2}")
    private Integer age;
    @Value("${person.sex}")
    private String sex;
    @Value("${address}")
    private String address;
}
